using UnityEngine;
using System.Collections;

public class HomeDown : MonoBehaviour {

	public bool isPlayer;
	public Home mainScript;
	public int playerId;
	
	void OnMouseEnter()
	{
		renderer.material.color = Color.red;
	}
	
	void OnMouseExit()
	{
		if(!isPlayer)
		{
			renderer.material.color = Color.white;
		}
	}
	
	void OnMouseDown()
	{
		mainScript.objectDown(playerId,renderer);
		isPlayer = true;
	}
	
	void yourPlayer()
	{
		isPlayer = true;
	}
	
	void notYourPlayer()
	{
		isPlayer = false;
	}
}
